package com.songdehuai.supermarket.supermarket.entity;

import android.os.Parcel;
import android.os.Parcelable;

public class Shop implements Parcelable {

    /**
     * id : 164
     * image : http://imgcdn.gonghuijia.cn/app_union/resources/images/store/shop/20180420085444_4117.jpg
     * shopname : 沃尔玛-长春测试店
     * addr : 吉林省长春市朝阳区重庆街道安华公寓
     * distance : 9.1
     * star : 1
     * months : 0
     * bespoke : true
     * feeofdelivery : 0
     * patchingscope : 50
     * suptdelivery : true
     */

    private int id;
    private String image;
    private String shopname;
    private String addr;
    private String distance;
    private int star;
    private int months;
    private boolean bespoke;
    private int feeofdelivery;
    private int patchingscope;
    private boolean suptdelivery;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public String getShopname() {
        return shopname;
    }

    public void setShopname(String shopname) {
        this.shopname = shopname;
    }

    public String getAddr() {
        return addr;
    }

    public void setAddr(String addr) {
        this.addr = addr;
    }

    public String getDistance() {
        return distance;
    }

    public void setDistance(String distance) {
        this.distance = distance;
    }

    public int getStar() {
        return star;
    }

    public void setStar(int star) {
        this.star = star;
    }

    public int getMonths() {
        return months;
    }

    public void setMonths(int months) {
        this.months = months;
    }

    public boolean isBespoke() {
        return bespoke;
    }

    public void setBespoke(boolean bespoke) {
        this.bespoke = bespoke;
    }

    public int getFeeofdelivery() {
        return feeofdelivery;
    }

    public void setFeeofdelivery(int feeofdelivery) {
        this.feeofdelivery = feeofdelivery;
    }

    public int getPatchingscope() {
        return patchingscope;
    }

    public void setPatchingscope(int patchingscope) {
        this.patchingscope = patchingscope;
    }

    public boolean isSuptdelivery() {
        return suptdelivery;
    }

    public void setSuptdelivery(boolean suptdelivery) {
        this.suptdelivery = suptdelivery;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.id);
        dest.writeString(this.image);
        dest.writeString(this.shopname);
        dest.writeString(this.addr);
        dest.writeString(this.distance);
        dest.writeInt(this.star);
        dest.writeInt(this.months);
        dest.writeByte(this.bespoke ? (byte) 1 : (byte) 0);
        dest.writeInt(this.feeofdelivery);
        dest.writeInt(this.patchingscope);
        dest.writeByte(this.suptdelivery ? (byte) 1 : (byte) 0);
    }

    public Shop() {
    }

    protected Shop(Parcel in) {
        this.id = in.readInt();
        this.image = in.readString();
        this.shopname = in.readString();
        this.addr = in.readString();
        this.distance = in.readString();
        this.star = in.readInt();
        this.months = in.readInt();
        this.bespoke = in.readByte() != 0;
        this.feeofdelivery = in.readInt();
        this.patchingscope = in.readInt();
        this.suptdelivery = in.readByte() != 0;
    }

    public static final Parcelable.Creator<Shop> CREATOR = new Parcelable.Creator<Shop>() {
        @Override
        public Shop createFromParcel(Parcel source) {
            return new Shop(source);
        }

        @Override
        public Shop[] newArray(int size) {
            return new Shop[size];
        }
    };
}
